<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>2411：黄牌</title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">黄牌</a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">黄牌</span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                黄牌                </h1>
                <p>时间限制：10s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：128MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><div style="line-height: 20pt"><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">最近经常在机房打</span><span style="font-size: 12pt">PES</span><span style="font-size: 12pt">，由于</span><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">过于扭曲的心灵，他总是让自己的队员自动申请黄牌，可是由于其技术有限</span><span style="font-size: 12pt">(</span><span style="font-size: 12pt">比如乌龙</span><span style="font-size: 12pt">T</span><span style="font-size: 12pt">不进</span><span style="font-size: 12pt">)</span><span style="font-size: 12pt">或</span><span style="font-size: 12pt">RP</span><span style="font-size: 12pt">太低，有时连犯规都没机会，有时甚至犯了规裁判也不判，这让</span><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">很郁闷。</span></div>
<div style="line-height: 20pt"><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size: 12pt">我们把球场抽象成一个长</span><span style="font-size: 12pt">w</span><span style="font-size: 12pt">宽</span><span style="font-size: 12pt">h</span><span style="font-size: 12pt">的矩形，其四个顶点分别为</span><span style="font-size: 12pt">(w, 0)</span><span style="font-size: 12pt">，</span><span style="font-size: 12pt">(w,h)</span><span style="font-size: 12pt">，</span><span style="font-size: 12pt">(0,h)</span><span style="font-size: 12pt">，</span><span style="font-size: 12pt">(0,0)</span><span style="font-size: 12pt">，而裁判位于点</span><span style="font-size: 12pt">(w0,0)</span><span style="font-size: 12pt">。场上有</span><span style="font-size: 12pt">n</span><span style="font-size: 12pt">名球员，第</span><span style="font-size: 12pt">i</span><span style="font-size: 12pt">名球员坐标为</span><span style="font-size: 12pt">(x<i><sub>i</sub>,y<sub>i</sub></i>)</span><span style="font-size: 12pt">，活动区域为半径为</span><span style="font-size: 12pt">r<sub>i</sub></span><span style="font-size: 12pt">的圆，每名球员的活动区域不可能到球场之外并且不会有两名球员的活动区域有公共点。若</span><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">位于某球队员的活动区域内或被某名球员的活动区域挡住了裁判的视线，那么即使</span><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">的动作再恶劣裁判都会以看不清为由拒绝判罚，否则</span><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">就能如其扭曲的心灵所愿从而吃牌。假设</span><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">出现在球场上每个点概率都相等，</span><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">想知道自己有多大的概率吃牌。</span></div>
<div style="line-height: 20pt">&nbsp;</div></p><hr/><h3>输入格式</h3><p><div style="line-height: 20pt"><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size: 12pt">第一行</span><span style="font-size: 12pt">4</span><span style="font-size: 12pt">个非负数，</span><span style="font-size: 12pt">n</span><span style="font-size: 12pt">，</span><span style="font-size: 12pt">w</span><span style="font-size: 12pt">，</span><span style="font-size: 12pt">h</span><span style="font-size: 12pt">，</span><span style="font-size: 12pt">w0</span><span style="font-size: 12pt">，如题中所述，其中只有</span><span style="font-size: 12pt">n</span><span style="font-size: 12pt">为整数。</span></div>
<div style="line-height: 20pt"><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size: 12pt">接下来</span><span style="font-size: 12pt">n</span><span style="font-size: 12pt">行，每行三个浮点数</span><span style="font-size: 12pt">x<sub>i</sub></span><span style="font-size: 12pt">，</span><span style="font-size: 12pt">y<sub>i</sub></span><span style="font-size: 12pt">，</span><span style="font-size: 12pt">r<sub>i</sub></span><span style="font-size: 12pt">，如题中所述。</span></div>
<div style="line-height: 20pt">&nbsp;</div></p><hr/><h3>输出格式</h3><p><div style="line-height: 20pt"><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-size: 12pt">一个数</span><span style="font-size: 12pt">ans</span><span style="font-size: 12pt">，表示</span><span style="font-size: 12pt">SJF</span><span style="font-size: 12pt">吃牌的概率。</span></div>
<div style="line-height: 20pt"><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ans</span><span style="font-size: 12pt">精度任意，但你的答案与标准答案的误差不能超过</span><span style="font-size: 12pt">10<sup>-5</sup></span><span style="font-size: 12pt">。</span></div>
<div style="line-height: 20pt">&nbsp;</div></p><hr/><h3>样例输入</h3><pre>       0 2 2 0
 
</pre><hr/><h3>样例输出</h3><pre>
       1
 
数据说明
       无论SJF在哪里犯规裁判都看得见，所以SJF的黄牌是吃定了。
 
</pre><hr/><h3>提示</h3><p><p>存在精度误差，不要提交!</p>
<p>对于100%的数据 0&le;n&le;1000</p></p><hr/><h3>题目来源</h3><p>没有写明来源</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=2411" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=2411" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>